I propose the following causal diagram:

To begin with, my DAG implies several potential associations that are worth testing. If I don’t see the associations I expect, then I may need to propose a new DAG. We also know that several types of causal relationships may appear the same within the data, so we may need to consider several alternative DAGs regardless.

cancer = read.csv("mouth_throat_cancer.csv")
head(cancer)
##    X age    sex smoking_status cigarettes_per_day years_smoking
## 1  9  70 Female          Never                  0             0
## 2 12  55   Male         Former                 15            13
## 3 25  79   Male          Never                  0             0
## 4 36  56 Female          Never                  0             0
## 5 39  77 Female        Current                 12             0
## 6 45  88 Female        Current                  6            45
##   secondhand_smoke_exposure alcohol    diet  type occupational
## 1                       Low    None Average  None         None
## 2                      High    None Average  None          Low
## 3                      High   Light Average Mouth         High
## 4                  Moderate    None    Poor  None         High
## 5                      High   Light    Poor  None         High
## 6                      High   Light    Poor  None         None

A naive assessment of causality might be to assess associations between proposed immediate causal variables the outcome of interest, using the appropriate statistical test:

with(cancer,
     chisq.test(alcohol, type))         
## 
##  Pearson's Chi-squared test
## 
## data:  alcohol and type
## X-squared = 2.3205, df = 6, p-value = 0.888
with(cancer, 
     chisq.test(diet, type))            
## 
##  Pearson's Chi-squared test
## 
## data:  diet and type
## X-squared = 1.408, df = 4, p-value = 0.8428
with(cancer, 
     chisq.test(occupational, type))    
## 
##  Pearson's Chi-squared test
## 
## data:  occupational and type
## X-squared = 0.63622, df = 4, p-value = 0.959
summary(lm(years_smoking ~ type, data = cancer))
## 
## Call:
## lm(formula = years_smoking ~ type, data = cancer)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -13.097 -13.097  -9.912  14.903  37.088 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    9.912      2.152   4.606 4.78e-06 ***
## typeNone       3.184      2.238   1.423    0.155    
## typeThroat     2.588      3.183   0.813    0.417    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 16.25 on 805 degrees of freedom
## Multiple R-squared:  0.002536,   Adjusted R-squared:  5.811e-05 
## F-statistic: 1.023 on 2 and 805 DF,  p-value: 0.3598

Note that none of our immediate causes are associated with the outcome of cancer.

But, returning to our causal diagram, we see that all of these have upstream causes of sex or age, and it’s fair to suspect that sex and age could be “directly” associated with the outcome as well, defining them as confounders.

So a better approach here would be to control for sex or age before assessing association:

####  Causal Approach
# Upstream proxy causes
(df = table(cancer$alcohol, 
           cancer$type, 
           cancer$sex))
## , ,  = Female
## 
##           
##            Mouth None Throat
##   Heavy        5  118      8
##   Light        5   95      2
##   Moderate     8   76      6
##   None         4   53      1
## 
## , ,  = Male
## 
##           
##            Mouth None Throat
##   Heavy       10   85      9
##   Light       10   78      9
##   Moderate     7   85      6
##   None         8  113      7
with(cancer, 
     mantelhaen.test(df))               # Not associated
## 
##  Cochran-Mantel-Haenszel test
## 
## data:  df
## Cochran-Mantel-Haenszel M^2 = 3.3464, df = 6, p-value = 0.7643
df = table(cancer$diet, 
           cancer$type, 
           cancer$sex)

with(cancer, 
     mantelhaen.test(df))               # Not associated
## 
##  Cochran-Mantel-Haenszel test
## 
## data:  df
## Cochran-Mantel-Haenszel M^2 = 1.5965, df = 4, p-value = 0.8094
df = table(cancer$alcohol, 
           cancer$type, 
           cancer$sex)

with(cancer, 
     mantelhaen.test(df))
## 
##  Cochran-Mantel-Haenszel test
## 
## data:  df
## Cochran-Mantel-Haenszel M^2 = 3.3464, df = 6, p-value = 0.7643

Looking at my proposed DAG again, what I really want to assess is something I didn’t even measure: HPV status.

To assess the effect of something I can’t measure, I first need to introduce the concept of effect decomposition.

Effect decomposition breaks up a measured effect into (1) direct effects, (2) indirect effects (via, for instance, mediation), and (3) interactive effects.

Let’s look at age:

bin_type = cancer$type
  bin_type[bin_type == "Mouth"] <- 1
  bin_type[bin_type == "Throat"] <- 1
  bin_type[bin_type == "None"] <- 0
  
bin_type = as.numeric(bin_type)
table(bin_type)
## bin_type
##   0   1 
## 703 105
model <- glm(bin_type ~ age + sex + years_smoking, data = cancer, 
             family = binomial(link = "logit"))
summary(model)
## 
## Call:
## glm(formula = bin_type ~ age + sex + years_smoking, family = binomial(link = "logit"), 
##     data = cancer)
## 
## Coefficients:
##                Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   -2.213956   0.342593  -6.462 1.03e-10 ***
## age            0.002534   0.005223   0.485    0.628    
## sexMale        0.509798   0.217398   2.345    0.019 *  
## years_smoking -0.009639   0.006855  -1.406    0.160    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 624.25  on 807  degrees of freedom
## Residual deviance: 616.99  on 804  degrees of freedom
## AIC: 624.99
## 
## Number of Fisher Scoring iterations: 4

Now we can feel quite confident that we’ve fully analyzed age. We didn’t set up this last model to properly account for sex, but there is a hint here that something might be going on.

To properly analyze the effect of sex on cancer outcome, we need to block all indirect pathways through mediators.

To determine if there is a direct association between patient sex and cancer outcome, we need to block all indirect pathways, which will include, alcohol, diet, and tobacco. But, just like with age, controlling for tobacco opens a pathway for age to act. Controlling for age accounts for this.

model2 <- glm(bin_type ~ sex + age + years_smoking + alcohol + diet,
              data = cancer, 
              family = binomial(link = "logit"))
summary(model2)
## 
## Call:
## glm(formula = bin_type ~ sex + age + years_smoking + alcohol + 
##     diet, family = binomial(link = "logit"), data = cancer)
## 
## Coefficients:
##                  Estimate Std. Error z value Pr(>|z|)    
## (Intercept)     -2.079744   0.403568  -5.153 2.56e-07 ***
## sexMale          0.583738   0.224627   2.599  0.00936 ** 
## age              0.002539   0.005274   0.481  0.63021    
## years_smoking   -0.009993   0.006890  -1.450  0.14695    
## alcoholLight    -0.096256   0.285813  -0.337  0.73628    
## alcoholModerate  0.017599   0.284683   0.062  0.95071    
## alcoholNone     -0.414498   0.310869  -1.333  0.18242    
## dietGood        -0.050992   0.256675  -0.199  0.84253    
## dietPoor        -0.144561   0.262470  -0.551  0.58179    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 624.25  on 807  degrees of freedom
## Residual deviance: 614.35  on 799  degrees of freedom
## AIC: 632.35
## 
## Number of Fisher Scoring iterations: 5

All of this work was under the assumption that our original DAG faithfully represented reality, but now we must concede there should be a direct arrow from age to cancer status, which probably represents exposure pathways over time that we did not previously account for.